<!DOCTYPE html>
<html>
<head>
    <title>{$name} {$seo_title} {$site_name}</title>
    <meta name="keywords" content="日新问答,行家说,专家解答" />
    <meta name="description" content="日新网—让新生活更近一点，让科技落地更从容一点。旗下拥有创新行业资讯日新网、
            创新专业培训日新研习社、创新企业孵化成长日新商脉三款产品，以住宅、商业地产、
            写字楼等不同业态物业经营的增效减能与增值创新以及服务标准化、
            物业智能化、信息化等策略方向的创新为主要研究内容，共同助力日新网成为物业行业创新风向标。">
    <tc_include file="Public:head" />
    <link href="/themes/simplebootx/Public/assets/css/reset.css" rel="stylesheet"/>
    <link href="/themes/simplebootx/Public/assets/css/sl_style.css?v={$SOURCE_VERSION}" rel="stylesheet"/>
    <link rel="stylesheet" href="__PUBLIC__/swiper/swiper.min.css">
    <style>
        .questions_btm span:not(:last-child):after {
            content: "、";
        }
        .questions_nav span {
            font-size: 18px;
            color: #000232;
            line-height: 90px;
            font-weight: bolder;
            margin: 0 18px;
            cursor: pointer;
        }
        .questions_nav .span_first {
            font-size: 12px;
            cursor: alias;
        }
        .questions_nav a {
            float: right;
            font-size: 24px;
            font-weight: bolder;
            letter-spacing: 2px;
            margin: 32px 10px 0 0;
        }
        /*问答*/
        .answers {
            overflow: hidden;
        }
        .answers_item {
            width: 558px;
            height: 138px;
            padding: 12px 12px 0;
            float: left;
            margin-bottom: 20px;
            margin-right: 26px;
            margin-top: 10px;
        }
        .answers a:nth-child(2n) .answers_item{
            margin-right: 0;
        }
        .answers_item .text {
            font-size: 18px;
            color: #000232;
            font-weight: bolder;
            line-height: 24px;
            margin-bottom: 20px;
        }
        .answers_item:hover {
            -webkit-box-shadow: 3px 3px 6px 2px
            rgba(0, 0, 0, 0.16);
            -moz-box-shadow: 3px 3px 6px 2px
            rgba(0, 0, 0, 0.16);
            box-shadow: 3px 3px 6px 2px
            rgba(0, 0, 0, 0.16);
            border-radius: 6px;
            /*opacity: 0.83;*/
        }
        .answers_item .picture_item {
            width: 56px;
            height: 56px;
            float: left;
            margin: 0 18px;
        }
        .answers .last_item {
            display:none;
        }
        .answers_item .picture_item .spot {
            display: block;
            width: 30px;
            height: 100%;
            background:url("/public/images/img/spot.png") no-repeat center;
        }
        .answers_item .picture_ground {
            overflow: hidden;
        }
        .answers_item .picture_item img {
            width: 56px;
            height: 56px;
            border-radius: 50%;
        }
        .questions_nav .active {
            color: #c8161d!important;
        }

        .swiper-slide {
            width: auto !important;
            float: left;
            text-align: center;
        }

        .swiper-container {
            margin-top: -45px;
        }

        .act_cat {
            color: #ff6b31 !important;
        }

        .swiper-wrapper {
            width: 80%;
            margin-left: -10px;
        }
        /*nav样式*/
        #menu-item-18 a{
            color: rgb(200, 22, 29);
        }
    </style>
</head>
<body>

    <tc_include file="Public:nav" />
    <div class="container tc-main" style="width:1200px;">
        <div class="focus_view" id="focus_view" >
            <p>日新问答</p>
        </div>

        <div class="questions_nav comment clearfix">
            <span class="span_first">问题分类:</span>
            <a href="{:U('Question/Question/add_question')}">提问</a>
        </div>

        <div class="swiper-container">
            <div class="swiper-wrapper">
                <volist name="post_categorys" id="vo">
                    <div class="swiper-slide" data-num="{$key}">
                        <a href="{:U('Question/Question/index', ['cat_id' => $vo['id']])}">
                            <span class="span_tab  {$cat_id == $vo['id'] ? 'act_cat' : ''}" style="margin-left: 20px;">{$vo.name}</span>
                        </a>
                    </div>
                </volist>
            </div>
        </div>

        <div class="answers question_div" style="width: 1198px;">
            <volist name="questions" id="vo">
                <a href="{:U('Question/Question/question_info', ['id' => $vo['id']])}" class="question_a">
                    <div class="answers_item">
                        <p class="text">{$vo.post_title}</p>
                        <div class="picture_ground">
                            <volist name="vo.answers" id="vo_n">
                                <div class="picture_item">
                                    <img src="{$vo_n}" alt="" class="my-photo">
                                </div>
                            </volist>
                            <if condition="count($vo['answers']) == 5">
                                <div class="picture_item last_item">
                                    <span class="spot"></span>
                                </div>
                            </if>
                        </div>
                    </div>
                </a>
            </volist>
        </div>
        <div style="width:110px;height: 30px;border-radius: 15px;border: 1px solid #C8161D; color: #C8161D;font-size: 15px;text-align: center;
    			line-height: 30px;margin-left: 350px; " class="js-infinite-scroll-loading text-center fontmsyhbd">更多问答</div>
        <div id="nextpage"></div>
    </div>
    <tc_include file="Public:footer" />
    <!-- JavaScript -->
    <tc_include file="Public:scripts" />
    <script src="__TMPL__Public/assets/js/masonry.pkgd.min.js"></script>
    <script src="__TMPL__Public/assets/js/jquery.infiniteScroll.js"></script>
    <script type="text/javascript" src="__PUBLIC__/swiper/swiper.min.js"></script>
    <script src="/public/slow_img/checkImg.js"></script>
   
    <script>
        var act_index = 0;
        $('.span_tab').each(function (index, item) {
            if ($(this).hasClass('act_cat')) {
                act_index = index;
            }
        })
        var mySwiper = new Swiper('.swiper-container', {
            // slidesPerView: 5.5, //头部一行显示多少个 .5表示显示半个
            spaceBetween: 0, //slide之间的距离（单位px）。
            loop: false, //是否可循环
            initialSlide : act_index, // 设置为2后，Swiper初始化时activeSlide成了第三个
            slidesPerView: "auto",
            /*设置slider容器能够同时显示的slides数量(carousel模式)。可以设置为number或者 'auto'则自动根据slides的宽度来设定数量。*/
            freeMode: false,
            /*自动贴合*/
            freeModeSticky: true,
            /*自动贴合。*/
            centeredSlides: false,
            /*设定为true时，活动块会居中，而不是默认状态下的居左。*/
            slideToClickedSlide: true,
            /*设置为true则swiping时点击slide会过渡到这个slide。*/
        });
    </script>
    <script>

        $(function(){
            $('#nextpage').infiniteScroll({
                loading:'.js-infinite-scroll-loading',
                total_pages:{$count},
                success:function(content){
                    var items = $(content).find('.question_a');
                    if(items.length > 0){
                        $('.question_div').append(items);
                    }
                }
            });
        });
    </script>
    <script>
        $(function () {
            $(".picture_ground").each(function (index,value) {
                var num = $(value).children().length;
                if(num >= 6){
                    $(value).find(".last_item").css("display","block");
                }
            })
        })
    </script>
    <script>
        $(function () {
            $(".span_tab").click(function () {
                $(this).addClass("active").siblings().removeClass("active");
            })
        })
    </script>
</body>
</html>